package com.blumov.fastbox.infrastructure.persistence.customtypes;

import org.hibernate.type.CharBooleanType;

/**
 * Custom Boolean Type que mapea un Boolean a un CHAR(1).
 *  Para utilizar con Oracle.
 *  
 *  1 = TRUE
 *  0 = FALSE
 *  
 * @author fernandop
 * @See CustomTypes.hbm.xml
 * 
 */


public class CustomBooleanType extends CharBooleanType {

	private static final long serialVersionUID = 1L;

	protected final String getTrueString() {
        return "1";
    }

    protected final String getFalseString() {
        return "0";
    }
    
    public String getName() { return "customBoolean"; }
}
